﻿using System;
namespace DbFrame.Core.Interface
{
    //
    using DbFrame.BaseClass;
    using System.Linq.Expressions;

    //
    public interface IQuery<T> : IQueryBase<T>, IQueryMappingData<T>
    {
        IQueryJoin<T, TJoin> Join<TJoin>(Expression<Func<T, TJoin, bool>> ON, EJoinType _EJoinType = EJoinType.LEFT_JOIN);
        //
        new IQuery<T> Top(int Top);
        new IQuery<T> Distinct();
        new IQuery<T> TakePage(int PageNumber, int PageSize);
        //
        TReturn Max<TReturn>(Expression<Func<T, TReturn>> Max);
        TReturn Min<TReturn>(Expression<Func<T, TReturn>> Min);
        TReturn Sum<TReturn>(Expression<Func<T, TReturn>> Sum);

    }
}
